package di

import (
	"fmt"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/aggregation"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/base/area"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/base/menu"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/base/msg"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/base/org"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/base/profit"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/base/role"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/base/tenant"
	userRepo "git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/base/user"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/base/user/new_user"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/bigdata"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/business_opportunity"
	clueRepo "git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/clue"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/common"
	jobCenterRepo "git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/job_center"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/market"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/rpa"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/subscription"
)

func (c *Inject) InjectRepo() {
	repos := []interface{}{
		business_opportunity.NewContactRepository,
		business_opportunity.NewCustomerRepository,
		business_opportunity.NewCustomerGroupRepository,
		business_opportunity.NewReportFollowRepository,
		business_opportunity.NewReportRepository,
		business_opportunity.NewOrderRepository,
		business_opportunity.NewProjectRepository,
		business_opportunity.NewBidRepository,
		business_opportunity.NewBuildingRepository,
		business_opportunity.NewStrategicMonitorRepository,
		clueRepo.NewClueRepository,
		clueRepo.NewCustomerManageRepository,
		common.NewCommonRepository,
		common.NewDmpReportRepository,
		common.NewFileRepository,
		common.NewFormRepository,
		common.NewMiniProgramRepository,
		common.NewOptionRepository,
		common.NewVerifyCodeRepository,
		common.NewSiteAnnouncementRepository,
		market.NewOutboundAccountRepository,
		market.NewOutboundCrowdRepository,
		market.NewOutboundTaskRepository,
		rpa.NewByaiRepository,
		rpa.NewRpaRepository,
		subscription.NewSubscriptionRepository,
		userRepo.NewLoginRepository,
		userRepo.NewUserRepository,
		area.NewAreaRepository,
		menu.NewMenuRepository,
		new_user.NewUserRepository,
		org.NewOrgRepository,
		msg.NewMsgRepository,
		profit.NewProfitRepository,
		role.NewRoleRepository,
		aggregation.NewStatisticsRepository,
		jobCenterRepo.NewJobCenterRepository,
		bigdata.NewBigdataRepository,
		tenant.NewTenantRepository,
		common.NewCreateTenantRepository,
	}
	var errs []error

	for _, repo := range repos {
		err := c.Provide(repo)
		if err != nil {
			errs = append(errs, err)
		}
	}
	fmt.Printf("InjectRepo #%+v\n", errs)
}
